<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>自助缴费</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weui.css" />
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weuix.css" />
    <script src="/lobsteruiframe/weui/js/zepto.min.js"></script>
    <script src="/lobsteruiframe/weui/js/zepto.weui.js"></script>
    <script src="/lobsteruiframe/weui/js/swipe.js"></script>
    <script src="/lobsteruiframe/weui/js/macy.js"></script>
    <script src="/jslib/lobster.js"></script>
    <script src="/jslib/template-web.js"></script>

    <script src="../js/paylist.js"></script>

    <style>
        .top {
            border-bottom: 1px solid #e8e8e8;
            position: fixed;
            left: 0;
            top: 0;
            right: 0;
            z-index: 999;
            background: #F6F6F9
        }

        .foot {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #FFFFFF;
            border-top: 1px solid #EEE;
            padding-top: 5px;
            padding-bottom: 5px;
            height: 50px;
        }

        .menu-left,
        .menu-right {
            position: fixed;
            left: 0;
            top: 44px;
            bottom: 0;
            overflow-y: scroll;
        }

        .menu-right #loading {
            left: 11px;
            top: 44px;
        }

        .menu-left {
            background: #F6F6F9;
        }

        .menu-left ul li {
            box-sizing: border-box;
            /* font-size: 12px; */
            color: #333;
            min-width: 76px;
            max-width: 120px;
            height: 42px;
            line-height: 42px;
            text-align: center;
        }

        .menu-left ul li.active {
            background: #fff;
            position: relative;
        }

        .menu-left ul li.active:before {
            content: " ";
            position: absolute;
            display: block;
            width: 2px;
            height: 100%;
            background: #07c160;
            top: 0;
            left: 0;
        }

        .weui-cells {
            margin-top: 0 !important;
        }

        .selectLable {
            background-color: #FF6600;
            color: #FFFFFF;
        }
    </style>
</head>

<body ontouchstart class="page-bg">

    <div class="top">
        <div class="weui-cells" style="height: 44px;background: #F8F8F8;">
            <a class="weui-cell weui-cell_access" href="javascript:;">
                <div class="weui-cell__bd" style="text-align: center;" id="patiengdiv">
                    <p id="selectedPatient">选择就诊人</p>
                </div>
                <div class="weui-cell__ft">
                </div>
            </a>
        </div>
        <div class="weui-tab" id="t1" style="height:44px;">
            <div class="weui-navbar">
                <div class="weui-navbar__item">
                    待缴处方
                </div>
                <div class="weui-navbar__item">
                    已缴处方
                </div>

            </div>

        </div>
    </div>

    <div class="page-bg" style="margin-top:100px;">
        <div class="weui-panel__bd">
            <div class="weui-media-box weui-media-box_small-appmsg">
                <div id="div_yetorder" class="weui-cells">

                </div>
                <div id="div_alreadycontent" class="hide">
                    <div style="padding:5px;">
                        <div class="weui-label-list">
                            <label class="label    selectLable" data-index="0">近三天</label>
                            <label class="label f-gray " data-index="1">近一周</label>
                            <label class="label f-gray " data-index="2">近一月</label>
                            <label class="label f-gray " data-index="3">近三月</label>
                        </div>
                    </div>
                    <div class="weui-cells" id="div_alreadyorder">

                    </div>
                </div>
            </div>
        </div>
        <div class="weui-loadmore">
            <i class="weui-loading"></i>
            <span class="weui-loadmore__tips">正在加载</span>
        </div>


    </div>
    <!-- <div class="foot">
            <div class="weui-flex">
                <div class="" style="align-items: center;" id="selectall">
                    <div class=" weui-cells_checkbox" style="margin-top: 0;">
                        <label class="weui-cell weui-check__label" for="sall">
                                <div class="weui-cell__hd">
                                    <input class="weui-check" name="checkbox1" id="sall" type="checkbox">
                                    <i class="weui-icon-checked"></i>
                                </div>
                                <div class="weui-cell__bd">
                                    <p>全选</p>
                                </div>
                            </label>
                    </div>
                </div>
                <div class="weui-flex__item" style="align-items: center;display: flex;">
                    <label style="margin: auto;color:#FF6600" id="totalmoney">金额:￥0</label>
                    <a href="javascript:;" class="weui-btn weui-btn_primary topay"
                        style="width: 100px; margin-right: 10px; border-radius: 0;">缴费</a>
                </div>
            </div>
        </div> -->


    <div id="half" class='weui-popup__container popup-bottom'>
        <div class="weui-popup__overlay"></div>
        <div class="weui-popup__modal">
            <div class="toolbar">
                <div class="toolbar-inner">
                    <a href="javascript:;" class="picker-button close-popup">关闭</a>
                    <h1 class="title">选择就诊人</h1>
                </div>
            </div>
            <div class="modal-content" style="min-height: 300px;">
                <div class="weui-cells weui-cells_form">
                    <div class="weui-cells" id="sidebaritem">

                    </div>
                </div>
            </div>
        </div>
    </div>


</body>

</html>

<script>

</script>


<script id="tplcard" type="text/html">
    {{if(list.length>0)}}
    {{each list }}
    <a class="weui-cell weui-cell_access carditem" href="javascript:;" data-info="{{$value}}" style="padding:6px 15px;">
        <div class="weui-cell__bd">
            <p> {{$value.Name}} : {{$value.IDCard}}</p>
        </div>
    </a>
    {{/each}}

    {{else}}
    <a class="weui-cell weui-cell_access bindcard" href="javascript:;" style="padding:6px 15px;">
        <div class="weui-cell__bd">
            <p style="display: flex; align-items: center;"> 暂无符合要求的卡片，去绑卡</p>
        </div>
    </a>
    {{/if}}
</script>
<!-- 待缴费处方 -->
<script type="text/template" id="tplyet">
    {{if(list.length>0)}}
    {{each list}}
    <div class="weui-panel weui-panel_access">
    <div class="weui-flex page-hd-desc" style="padding:15px;">
        <div class="weui-flex__item">病人:{{$value.PatName}}</div>
        <div class="weui-flex__item">卡号:{{$value.CardNum}}</div>
        <div class="weui-flex__item">门诊号:{{$value.Regno}}</div>
    </div>
    
    {{each $value.FeeItems item }}
    
    <div class="weui-flex page-hd-desc" style="padding-left:15px;padding-right:15px;">
        <div class="weui-cell__bd">
            <p>{{item.ItemName}}</p>
        </div>
        <div class="weui-cell__hd">
            <p>{{item.UnitPrice}} x {{item.Quantity}} {{item.Unit}}</p>
        </div>
    </div>
    
    {{/each}}
    <div class="weui-flex">
        <div class="weui-flex__item" style="text-align: right;color:#FF6600;margin-right: 10px;padding:5px">￥ {{$value.Fee}}元</div>
        <!-- <div class="weui-flex__item" style="text-align: right; margin-right: 10px;padding:5px">
            <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_warn toPay" data-info="{{$value}}">缴费</a>
        </div> -->
    </div>
    </div>
    <div class="weui-btn-area">
    <a class="weui-btn  b-orange toPay" href="javascript:" data-info="{{$value}}">缴费</a>
    </div>
    {{/each}}
    {{else}}
    <div class="weui-loadmore weui-loadmore_line">
        <span class="weui-loadmore__tips">暂无数据</span>
    </div>
    {{/if}}
</script>

<!-- 已缴费处方 -->
<script type="text/template" id="tplalready">
    {{if(list.length>0)}}
    {{each list }}
    <a class="weui-cell weui-cell_access" href="javascript:;">
        <div class="weui-cell__bd weui-cell_primary   item" data-info="{{$value}}" >
            <div class="weui-media-box__title" style="padding:1px;">{{$value.Repno}} <span class="f-gray"> {{$value.DoctName}}-{{$value.DeptName}}</span>
            </div>
        
            <div class="page-hd-desc" style="padding:1px;">开方时间：{{$value.FeeTime }}</div>
            <div class="page-hd-desc weui-news-p" style="padding:1px; -webkit-line-clamp: 2;">处方内容：{{$value.Memo }}</div>
        </div>
        <div class="weui-cell__hd">
            <div style="color:#FF6600">
                ￥{{$value.PersonFee}}
            </div>
        </div>
        <span class="weui-cell__ft"></span>
    </a>
    {{/each}}
    {{else}}
        <div class="weui-loadmore weui-loadmore_line">
            <span class="weui-loadmore__tips">暂无数据</span>
        </div>
    {{/if}}
</script>